﻿using System;

namespace DatabaseGroup.SSIS.SourceAdapters.View
{
    /// <summary>
    /// Event linked to a specific tab
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void TabEventHandler(object sender, TabEventArgs e);

    /// <summary>
    /// Event data relating to an event linked to a tab
    /// </summary>
    public class TabEventArgs : EventArgs
    {
        /// <summary>
        /// Initializes a new instance of the TabEventArgs class
        /// using the specified tab
        /// </summary>
        /// <param name="tab">The tab the event relates to</param>
        public TabEventArgs(EditorViewTab tab)
        {
            this.Tab = tab;
        }

        /// <summary>
        /// Gets the tab the event relates to
        /// </summary>
        public EditorViewTab Tab { get; private set; }
    }
}
